package ldh.fx.adminfx.controller;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import org.controlsfx.validation.ValidationSupport;

import java.net.URL;
import java.util.ResourceBundle;


public class FormPaneController implements Initializable {

    private ValidationSupport validationSupport = null;

//    @FXML
//    private TextField emailField2;
//    @FXML
//    private TextField emailField;

    public FormPaneController() {
        validationSupport = new ValidationSupport();
    }

    @FXML
    public void chartContentClick() {
//        addDecoration(emailField2, new GraphicDecoration(createImageNode(), Pos.BOTTOM_LEFT));
    }

    @Override
    public void initialize(URL location, ResourceBundle resources) {
//        validationSupport.registerValidator(emailField2, Validator.createEmptyValidator("Text is required"));
//        validationSupport.registerValidator(emailField, Validator.createEmptyValidator("Text is required"));
    }

    private Node createImageNode() {
        Image image = new Image("/img/security-low.png");
        ImageView imageView = new ImageView(image);
        return imageView;
    }
}
